﻿Imports System.Data.OleDb
Public Class sms_info_about
    Inherits System.Web.UI.Page




    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub


    Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        ' New Code - sms_info_contact_info.aspx.vb - 12 Jan 2014 - Gene Da Rocha - Adding New Data to SMS_INFO table.

        Dim oleDbConn As New OleDb.OleDbConnection(ConfigurationManager.ConnectionStrings("ConnectionString004").ConnectionString)
        Dim SqlString As String = "Insert into sms_info(about_website,contact_website,about_image1,about_image2,about_image3,about_image4,about_image5,about_image6) Values(@f1,@f2,@f3,@f4,@f5,@f6,@f7,@f8)"
        Dim cmd As OleDbCommand = New OleDbCommand(SqlString, oleDbConn)


        cmd.Parameters.AddWithValue("@f1", about_website.Text)
        cmd.Parameters.AddWithValue("@f2", contact_website.Text)
        cmd.Parameters.AddWithValue("@f3", about_image1.Text)
        cmd.Parameters.AddWithValue("@f4", about_image2.Text)
        cmd.Parameters.AddWithValue("@f5", about_image3.Text)
        cmd.Parameters.AddWithValue("@f6", about_image4.Text)
        cmd.Parameters.AddWithValue("@f7", about_image5.Text)
        cmd.Parameters.AddWithValue("@f8", about_image6.Text)
        oleDbConn.Open()
        cmd.ExecuteNonQuery()
        oleDbConn.Close()
        labelrecord.Text = "Record Added"
        about_website.Text = ""
        contact_website.Text = ""
        about_image1.Text = ""
        about_image2.Text = ""
        about_image3.Text = ""
        about_image4.Text = ""
        about_image5.Text = ""
        about_image6.Text = ""
        labelrecord.Text = ""
        Response.Redirect("sms_info_about.aspx")
    End Sub


End Class